﻿<!DOCTYPE html>
<html>
<head>
    <title>title</title>
    <link type="text/css" rel="stylesheet" href="index.css" />
</head>
<body>
    <div class="demo">this is index.html</div>
    <input type="button" value="MessageBox" id="btn_msb" />
    <input type="button" value="Test_Event" id="btn_te" />
    <input type="button" value="OpenForm" id="btn_open" />

    <input type="button" value="Ajax" id="btn_ajax" />
    <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
    <script>
        $("#btn_msb").click(function () {
            M5.qqTest({ msg: "click msg" });
        });

        $("#btn_open").click(function () {
            M5.openform.event("NormalForm");
        });

        $("#btn_te").click(function () {
            var a = M5.test.index(
                {
                    name: "troy",
                    age: 32,
                    ddd: new Date('2018-5-23')
                }, "abc");
            console.log(a);
            //M5.test({ test: { name: "troy", age: 32 }});
        });

        $("#btn_ajax").click(function () {
            $.ajax({
                url: "http://m5/test/abc",
                type: "post",
                data: { name: "troy", score: 95 },
                success: function (qq) {
                    console.log(qq);
                },
                statusCode: {
                    404: function (msg) {
                        console.log(msg.responseText);
                    }
                }
            });
        });
    </script>
</body>
</html>